<?php
defined('IN_XLP') or exit('Access Denied');
$Document = array(
    'pageid'   => 'task-poster', //页面标示
    'pagename' => '任务发布人列表', //当前页面名称
    'mycss'    => array(), //加载的css样式表
    'myjs'     => array(), //加载的js脚本
    'footerjs' => array(),
    'head'     => true, //加载头部文件
);
include getTpl('header', 'public');
?>
<style>
tr th,tr td{text-align:center}
tr td img{border-radius:30px}
.txl{text-align:left}
.under-pointer{text-decoration:underline;cursor:pointer;font:bold 16px/16px Arial;}
.underline:hover{text-decoration:underline;}
</style>
<!--顶部导航 开始-->
<?php include getTpl('top', 'public');?>
<!--顶部导航 结束-->
<!--左侧菜单 开始-->
<?php include getTpl('nav', 'public');?>
<!--左侧菜单 结束-->
<!--主体 开始-->
<!-- content -->
<section id="content">
    <!-- main padder -->
    <section class="main padder">
        <div class="clearfix">
            <h4><i class="fa fa-table"></i>任务发布人列表</h4>
            <section class="panel">
                    <div class="panel-body">
                        <div class="row text-small">
                            <div class="col-sm-1">
                                <div class="input-group">
                                    <a class="btn btn-sm btn-white" href="<?php echo U('task/add_poster') ?>">新增发布人</a>
                                </div>
                            </div>
                            <form action="<?php echo U('task/poster'); ?>" method="get">
                                <input type="hidden" name="g" value="content">
                                <input type="hidden" name="c" value="task">
                                <input type="hidden" name="m" value="poster">
                                <div class="col-sm-2 w14">
                                    <div class="input-group">
                                        <input type="text" class="input-sm form-control" placeholder="发布人名称" name="keyword" id="keyword" value="<?php echo $keyword; ?>">
                                        <span class="input-group-btn">
                                            <button class="btn btn-sm btn-white" type="submit">搜索</button>
                                        </span>
                                    </div>
                                </div>
                                <div class="col-sm-2">
                                    <div class="input-group">
                                        <a class="btn btn-sm btn-white" href="<?php echo U('task/poster'); ?>">搜索重置</a>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>

                    <div class="table-responsive">
                        <table class="table table-striped b-t text-small">
                            <thead>
                                <tr>
                                    <th width="80">序号</th>
                                    <th width="">头像</th>
                                    <th width="">发布人</th>
                                    <th width="100">发布人UID</th>
                                    <th width="">昵称</th>
                                    <th width="">手机号</th>
                                    <th width="200">发布任务总数</th>
                                    <th width="200">注册时间</th>
                                    <th width="150">操作</th>
                                </tr>
                            </thead>
                            <tbody>
                                <?php foreach ($poster_list as $k => $v): ?>
                                <tr>
                                    <td><?php echo $k+1 ?></td>
                                    <td><?php echo getAvatar($v['uid'],60,false,false,'user-pic f-l');?></td>
                                    <td><?php echo $v['poster_name'] ?></td>
                                    <td><?php echo $v['uid'] ?></td>
                                    <td><?php echo $v['nickname'] ?></td>
                                    <td><?php echo $v['phone']?></td>
                                    <td><span class="under-pointer"><?php echo $v['task_num'] ?></span></td>
                                    <td><?php echo date('Y-m-d H:i:s', $v['reg_time']) ?></td>
                                    <td><a class="underline" href="<?php echo U('task/add',array('uid'=>$v['uid'])) ?>">发布新任务</a></td>
                                </tr>
                                <?php endforeach ?>
                            </tbody>
                        </table>
                    </div>
                    
                    <footer class="panel-footer">
                        <div class="row">
                            <div class="col-sm-12 text-right text-center-sm">
                                <?php echo page($total,$page,'', 20, 'page');?>
                            </div>
                        </div>
                    </footer>

                </div>
            </section>
        </div>
    </section>
    <!--/ main padder -->
</section>
<!--/ content -->
<!--主体 结束-->
<script></script>
<?php include getTpl('footer', 'public'); ?>